package com.vogue.supplymall.example.domain.mapper;

import com.vogue.supplymall.example.domain.model.Member;
import com.vogue.supplymall.example.domain.model.Order;
import org.apache.ibatis.annotations.*;

/**
 * Created by Administrator on 2017-11-28.
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order,Long>{

    @Select("select * from member where id = #{id}")
    public Member selById(Long id);

    @Select("select * from `order` where id = #{id}")
    @Results({
            @Result(column="memid",property="member",
                    one=@One(
                            select="com.vogue.supplymall.example.domain.mapper.OrderMapper.selById"
                    ))
    })
    public Order findById(Long id);

}
